<template>
  <div>
    <router-view />
  </div>
</template>
<script>
import cache from '@/utils/cache'
export default {
  data () {
    return {
      theme: 'default-theme'
      // theme: 'orange-theme'
    }
  },
  mounted () {
    this.setTheme()
  },
  methods: {
    // 获取url以及主题缓存切换主题
    setTheme () {
      const { value = 1 } = cache.getCache('portal_type_is_inner') || {}
      if (parseInt(value) === 0) {
        this.theme = 'orange-theme'
      } else if (cache.getCache('theme')) {
        this.theme = cache.getCache('theme')
      }
      window.document.documentElement.setAttribute('data-theme', this.theme)
    }
  }

}
</script>

<style lang='scss'>
body {
  overflow: hidden;
  // background: #f5f7fa;
  font-family: Microsoft YaHei, Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: $--color-text-regular;
}
</style>
